﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Print.aspx.cs" Inherits="BasicBase_SoldierArchive_Print"
    StylesheetTheme="Content" Title="士兵信息--输出EXCEL" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css" media="print">
        .Noprint
        {
            display: none;
        }
        .PageNext
        {
            page-break-after: always;
        }
        #gvSoldiers td
        {
            border: solid 1px #FFFFFF;
        }
    </style>
</head>
<body>
    <object id="WebBrowser" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" height="0"
        width="0">
    </object>
    <form id="form1" runat="server">
    <div>
        <table cellpadding="0" cellspacing="0" width="100%" class="intable">
            <caption>
                <span>输出可选字段</span>
            </caption>
            <tr>
                <td>
                    <asp:CheckBoxList ID="cblSelect" runat="server" RepeatColumns="10" RepeatDirection="Horizontal"
                        AutoPostBack="True" OnSelectedIndexChanged="CheckBoxList1_SelectedIndexChanged">
                        <asp:ListItem Selected="True" Value="1" Text="姓名"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="2" Text="性别"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="3" Text="民族"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="4" Text="部门"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="5" Text="职务"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="6" Text="警衔"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="7" Text="家庭背景"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="8" Text="个人成分"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="9" Text="文化程度"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="10" Text="宗教信仰"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="11" Text="婚姻状况"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="12" Text="出生日期"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="13" Text="入团时间"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="14" Text="入党时间"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="15" Text="入伍时间"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="16" Text="入伍所有地"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="17" Text="入伍批准书编号"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="18" Text="士兵证号"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="19" Text="士兵登记表编号"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="20" Text="士官选取表编号"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="21" Text="专业一"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="22" Text="专业二"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="23" Text="家庭住址"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="24" Text="是否是合同制"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="25" Text="身高"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="26" Text="体重"></asp:ListItem>
                        <asp:ListItem Selected="True" Value="27" Text="籍贯"></asp:ListItem>
                    </asp:CheckBoxList>
                </td>
            </tr>
            <tr>
                <td>
                    <ul class="topmenu">
                        <li>
                            <asp:LinkButton runat="server" ID="lkbExcel" OnClick="lkbExcel_Click">导出</asp:LinkButton></li>
                        <li>
                            <asp:Label runat="server" ID="lblWhere" Visible="false"></asp:Label>
                        </li>
                    </ul>
                </td>
            </tr>
        </table>
        <div id="printpage" style="background-color: #FFF; padding: 0">
            <asp:GridView ID="gvSoldiers" runat="server" AutoGenerateColumns="False" Caption="<span>士兵详细信息</span>"
                DataKeyNames="SoldierID,DepartmentID" Width="100%" OnRowDataBound="gvSoldiers_RowDataBound"
                BorderColor="#cccccc" GridLines="Both" BorderWidth="1">
                <Columns>
                    <asp:TemplateField HeaderText="序号">
                        <ItemTemplate>
                            <asp:Label ID="ID" runat="server"></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="SoldierName" HeaderText="姓名" />
                    <asp:BoundField DataField="Sex" HeaderText="性别" />
                    <asp:TemplateField HeaderText="民族">
                        <ItemTemplate>
                            <%# GetCodeItem(Eval("Nation"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="部门">
                        <ItemTemplate>
                            <%# GetDepartment(Eval("DepartmentID"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="职务">
                        <ItemTemplate>
                            <%# GetCodeItem(Eval("Duty"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="警衔">
                        <ItemTemplate>
                            <%# GetCodeItem(Eval("Rank"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="家庭背景">
                        <ItemTemplate>
                            <%# GetCodeItem(Eval("Background"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="个人成分">
                        <ItemTemplate>
                            <%# GetCodeItem(Eval("Status"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="文化程度">
                        <ItemTemplate>
                            <%# GetCodeItem(Eval("Culture"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="宗教信仰">
                        <ItemTemplate>
                            <%# GetCodeItem(Eval("Religion"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="婚姻状况">
                        <ItemTemplate>
                            <%# Eval("Marriage")%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="出生日期">
                        <ItemTemplate>
                            <%# GetDateTime(Eval("Birthday"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="入团时间">
                        <ItemTemplate>
                            <%# GetDateTime(Eval("YouthTime"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="入党时间">
                        <ItemTemplate>
                            <%# GetDateTime(Eval("PartyTime"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="入伍时间">
                        <ItemTemplate>
                            <%# GetDateTime(Eval("JoinTime"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="入伍所有地">
                        <ItemTemplate>
                            <%# Eval("JoinPlace")%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="入伍批准书编号">
                        <ItemTemplate>
                            <%# Eval("ConfirmID").ToString()%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="士兵证号">
                        <ItemTemplate>
                            <%# "&nbsp;"+Eval("CardID").ToString()%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="士兵登记表编号">
                        <ItemTemplate>
                            <%# Eval("RegisterID").ToString()%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="士官选取表编号">
                        <ItemTemplate>
                            <%# Eval("ChooseID").ToString()%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="专业一">
                        <ItemTemplate>
                            <%# GetCodeItem(Eval("Speciality1"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="专业二">
                        <ItemTemplate>
                            <%# GetCodeItem(Eval("Speciality2"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="家庭住址">
                        <ItemTemplate>
                            <%# Eval("HomePlace")%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="是否是合同制">
                        <ItemTemplate>
                            <%# GetBool(Eval("IsContract"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="身高">
                        <ItemTemplate>
                            <%# Eval("Height")%>cm
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="体重">
                        <ItemTemplate>
                            <%# Eval("Weight")%>kg
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="籍贯">
                        <ItemTemplate>
                            <%#Eval("NativeName")%>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <RowStyle HorizontalAlign="Left" />
                <HeaderStyle HorizontalAlign="Left" />
            </asp:GridView>
        </div>
    </div>
    </form>
</body>
</html>
